package com.tekj.cxqcb.view.Module.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.squareup.picasso.Picasso;
import com.tekj.cxqcb.R;

import java.util.List;

public class StorePhotoAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public StorePhotoAdapter(@Nullable List<String> data) {
        super(R.layout.item_proposal2, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        Picasso.get().load(item.equals("")?"1":item)
                .resize(1920, 1080)
                .centerCrop()
                .onlyScaleDown()
                .into((ImageView) helper.getView(R.id.img_sel));
        helper.setGone(R.id.img_add,false);
    }
}
